home *** CD-ROM | disk | FTP | other *** search
- /*
- * ping.h
- *
- * Copyright (C) 1994 Tomoaki Tada/F.C.T.
- *
- * $Id: ping.h,v 1.2 1994/07/19 12:23:56 Niggle Exp $
- */
-
- #ifndef __ping_h__
- #define __ping_h__
-
- /* Message types */
- #define ICMP_ECHO_REPLY 0 /* Echo Reply */
- #define ICMP_ECHO 8 /* Echo Request */
-
- /* IP protocol number for icmp */
- #define ICMP_PCTL (1)
-
- /* echo type icmp structure */
- struct icmp
- {
- char type;
- char code;
- unsigned short cksum;
- unsigned short id;
- unsigned short seq;
- };
-
- struct ping
- {
- long target; /* target IP address */
- long sent; /* Total number of pings sent */
- long responses; /* Total number of responses */
- long dup;
- long lost;
- long interval; /* Inter-ping interval, ticks */
- unsigned short len; /* Length of data portion of ping */
- long Mrtt; /* Maximum round trip time */
- long mrtt; /* minimum round trip time */
- long srtt; /* total round trip time */
- };
-
- #endif
-